Skip to content

[Feature] Enable get-token and bootstrap certificate from Key Vault#613

Open
nchapagain001 wants to merge 29 commits intomainfrom
users/nchapagain/Feature_Enable_KV_AccessToken
Open

[Feature] Enable get-token and bootstrap certificate from Key Vault#613
nchapagain001 wants to merge 29 commits intomainfrom
users/nchapagain/Feature_Enable_KV_AccessToken

Conversation

@nchapagain001
Copy link
Contributor

@nchapagain001 nchapagain001 commented Jan 10, 2026

In this PR, following changes have been made:

-> Adding subcommand to get-token.

-> In bootstrap, existing subcommand, we are enabling users to download certificate.

The example below shows how to get token and bootstrap certificate using the token.

image

@nchapagain001 nchapagain001 changed the title Users/nchapagain/feature enable kv access token [Feature] Enable get-token and bootstrap certificate from Key Vault Feb 13, 2026
@nchapagain001 nchapagain001 marked this pull request as ready for review February 13, 2026 07:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds two new features to Virtual Client: a get-token subcommand to retrieve Azure access tokens for Key Vault authentication, and enhanced bootstrap command functionality to support certificate installation from Azure Key Vault. The implementation allows users to either use default Azure credential flows or explicitly provide an access token for Key Vault operations.

Changes:

  • Added get-token subcommand that acquires Azure access tokens using interactive browser authentication with device-code fallback
  • Enhanced bootstrap subcommand to support certificate installation from Azure Key Vault in addition to package installation
  • Introduced new components KeyVaultAccessToken and CertificateInstallation for token acquisition and certificate management

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 25 comments.

Show a summary per file
File Description
website/docs/guides/0010-command-line.md Documentation for new get-token subcommand and updated bootstrap command with certificate installation support
src/VirtualClient/VirtualClient.Main/Program.cs Added get-token subcommand registration and bootstrap command validation for certificate operations
src/VirtualClient/VirtualClient.Main/OptionFactory.cs Added --token and --cert-name command-line options
src/VirtualClient/VirtualClient.Main/GetAccessTokenCommand.cs New command implementation for retrieving access tokens
src/VirtualClient/VirtualClient.Main/BootstrapPackageCommand.cs Enhanced to support certificate installation alongside package installation
src/VirtualClient/VirtualClient.Main/InstallCertCommand.cs Unused/orphaned command file that should be removed
src/VirtualClient/VirtualClient.Main/CommandBase.cs Added ShouldInitializeKeyVault property to control Key Vault initialization
src/VirtualClient/VirtualClient.Main/profiles/GET-ACCESS-TOKEN.json Profile definition for token acquisition workflow
src/VirtualClient/VirtualClient.Main/profiles/BOOTSTRAP-DEPENDENCIES.json Updated to support both package and certificate installation
src/VirtualClient/VirtualClient.Dependencies/KeyVaultAccessToken.cs Component for acquiring Azure access tokens with browser/device-code fallback
src/VirtualClient/VirtualClient.Dependencies/CertificateInstallation.cs Component for installing certificates from Key Vault to local certificate stores
src/VirtualClient/VirtualClient.Core/Identity/AccessTokenCredential.cs Token credential implementation for pre-acquired access tokens
src/VirtualClient/VirtualClient.Core/EndpointUtility.cs Added method to parse tenant ID from URIs
src/VirtualClient/VirtualClient.Core/KeyVaultManager.cs Removed unused using statement
src/VirtualClient/VirtualClient.Core/IKeyVaultManager.cs Added missing System namespace import
src/VirtualClient/VirtualClient.TestFramework/MockFixture.cs Added KeyVaultManager mock support for testing
src/VirtualClient/VirtualClient.UnitTests/*.cs Unit tests for new commands and validation logic
src/VirtualClient/VirtualClient.Dependencies.UnitTests/*.cs Unit tests for KeyVaultAccessToken and CertificateInstallation components
src/VirtualClient/VirtualClient.Core.UnitTests/EndpointUtilityTests.cs Tests for tenant ID parsing functionality
src/VirtualClient/VirtualClient.Actions.FunctionalTests/GetAccessTokenProfileTests.cs Functional tests for the GET-ACCESS-TOKEN profile
VERSION Version bumped to 2.1.56

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…lation.cs


copilot feedback

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nirjan Chapagain <165215502+nchapagain001@users.noreply.github.com>
Copy link

Copilot AI commented Feb 13, 2026

@nchapagain001 I've opened a new pull request, #638, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nirjan Chapagain <165215502+nchapagain001@users.noreply.github.com>
Copy link

Copilot AI commented Feb 13, 2026

@nchapagain001 I've opened a new pull request, #639, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link

Copilot AI commented Feb 13, 2026

@nchapagain001 I've opened a new pull request, #640, to work on those changes. Once the pull request is ready, I'll request review from you.

nchapagain001 and others added 7 commits February 13, 2026 10:13
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nirjan Chapagain <165215502+nchapagain001@users.noreply.github.com>
…ntial.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nirjan Chapagain <165215502+nchapagain001@users.noreply.github.com>
* Initial plan

* Add copyright header to CertificateInstallationTests.cs

Co-authored-by: nchapagain001 <165215502+nchapagain001@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nchapagain001 <165215502+nchapagain001@users.noreply.github.com>
#639)

* Initial plan

* Fix incorrect class description in CertificateInstallation.cs

Co-authored-by: nchapagain001 <165215502+nchapagain001@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nchapagain001 <165215502+nchapagain001@users.noreply.github.com>
* Initial plan

* Clarify tenant ID requirement in get-token documentation

Co-authored-by: nchapagain001 <165215502+nchapagain001@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: nchapagain001 <165215502+nchapagain001@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants